package app.vendorportal.api.marketplace;

import app.vendorportal.api.data.request.CalculateDeliveryDateRequest;
import app.vendorportal.api.data.response.CalculateDeliveryDateResponse;
import app.vendorportal.api.marketplace.data.request.QueryDeliveryDateRequest;
import app.vendorportal.api.marketplace.data.request.QueryDeliveryInfoRequest;
import app.vendorportal.api.marketplace.data.response.QueryDeliveryDateResponse;
import app.vendorportal.api.marketplace.data.response.QueryDeliveryInfoResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;

/**
 * @author carl.you
 */
public interface DeliveryDateNewAPIService {

    @RequestMapping(value = "/market/delivery/warehouse", method = RequestMethod.POST)
    @ResponseBody
    QueryDeliveryDateResponse findWarehouseLevelDeliveryInfo(@Valid @RequestBody QueryDeliveryDateRequest request);

    @RequestMapping(value = "/market/delivery/sku", method = RequestMethod.POST)
    @ResponseBody
    QueryDeliveryInfoResponse findSkuLevelDeliveryInfo(@Valid @RequestBody QueryDeliveryInfoRequest request);

    @RequestMapping(value = "/market/calculate-delivery-date", method = RequestMethod.POST)
    @ResponseBody
    CalculateDeliveryDateResponse calculateDeliveryDate(@Valid @RequestBody CalculateDeliveryDateRequest request);
}
